import request from '@/utils/request'
// 获取菜品分类
export const getCatagoriesList = () => {
  return request.get('/categories/list')
}
// 获取分类下的菜品列表
export const getCatagoriesDishs = (categoryId) => {
  return request.get(`/categories/${categoryId}/dishes`)
}
// 新增分类
export const addcategories = (obj) => {
  return request.post('/categories/add', obj)
}
//修改分类信息
export const altercategories = (obj) => {
  return request.put('/categories/update', obj)
}
// 删除分类，条件删除如果下面没有菜品才可以删除
export const deletecategories = (id) => {
  return request.delete(`/categories/${id}`)
}
